package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MeowInventoryMapper;
import com.ruoyi.system.domain.MeowInventory;
import com.ruoyi.system.service.IMeowInventoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-24
 */
@Service
public class MeowInventoryServiceImpl implements IMeowInventoryService 
{
    @Autowired
    private MeowInventoryMapper meowInventoryMapper;

    /**
     * 查询库存管理
     * 
     * @param productId 库存管理主键
     * @return 库存管理
     */
    @Override
    public MeowInventory selectMeowInventoryByProductId(String productId)
    {
        return meowInventoryMapper.selectMeowInventoryByProductId(productId);
    }

    /**
     * 查询库存管理列表
     * 
     * @param meowInventory 库存管理
     * @return 库存管理
     */
    @Override
    public List<MeowInventory> selectMeowInventoryList(MeowInventory meowInventory)
    {
        return meowInventoryMapper.selectMeowInventoryList(meowInventory);
    }

    /**
     * 新增库存管理
     * 
     * @param meowInventory 库存管理
     * @return 结果
     */
    @Override
    public int insertMeowInventory(MeowInventory meowInventory)
    {
        return meowInventoryMapper.insertMeowInventory(meowInventory);
    }

    /**
     * 修改库存管理
     * 
     * @param meowInventory 库存管理
     * @return 结果
     */
    @Override
    public int updateMeowInventory(MeowInventory meowInventory)
    {
        return meowInventoryMapper.updateMeowInventory(meowInventory);
    }

    /**
     * 批量删除库存管理
     * 
     * @param productIds 需要删除的库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMeowInventoryByProductIds(String productIds)
    {
        return meowInventoryMapper.deleteMeowInventoryByProductIds(Convert.toStrArray(productIds));
    }

    /**
     * 删除库存管理信息
     * 
     * @param productId 库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMeowInventoryByProductId(String productId)
    {
        return meowInventoryMapper.deleteMeowInventoryByProductId(productId);
    }
}
